package Impl;

import Bean.BeanSc;
import Bean.BeanStudent;
import Dao.ScDao;
import Dao.StudentDao;
import Service.ScService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service("ScServiceImpl")
public class ScServiceImpl implements ScService {
    @Resource(name="ScDAO")
    ScDao scDao;

    public ScDao getScDao() {
        return scDao;
    }

    public void setScDao(ScDao scDao) {
        this.scDao = scDao;
    }


    @Override
    public void setSc(BeanSc beanSc) throws Exception {
        scDao.setSc(beanSc);
    }

    @Override
    public ArrayList<BeanSc> getSc(BeanSc beanSc) throws Exception {
        return scDao.getSc(beanSc);
    }

    @Override
    public void insertSc(int class_id, String day) {
        scDao.insertSc(class_id,day);
    }
}
